cmake_minimum_required(VERSION 3.10)

# 1.查找当前目录下的所有源文件
file(GLOB CONFIG_SOURCES CONFIGURE_DEPENDS "*.cc")
set(UTILS_SOURCES ${CONFIG_SOURCES} ${PB_SOURCES})

# 2.编译成静态库
add_library(utils STATIC ${UTILS_SOURCES})

# 3.显示声明头文件路径（即使主CMakeLists已经设置）
target_include_directories(utils PUBLIC
    ${PROJECT_SOURCE_DIR}/include    # 主项目的头文件目录
    ${ZMQ_INCLUDE_DIR} # 包含zmq的头文件
)

# 4.打印调试信息
message(STATUS "utils module finish.")